/*
 * 版权所有 (c) 2022-2099 TBIT。保留所有权利。
 */

package com.tbit.main.pojo;


import com.tbit.main.pojo.VO.FeeAppealInfoVO;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author:BUGTian
 * @DATE: 2022/11/17
 */
@Data
public class RideLogDetailsVO extends RideLogDetails {
    /**
     * 已退款金额
     */
    private Double isRefundMoney;
    /**
     * 骑行费用已退款金额
     */
    private Double refundRideMoney;
    /**
     * 骑行费用剩余可退
     */
    private Double returnableRideMoney;
    /**
     * 罚款费用已退款金额
     */
    private Double refundFineMoney;
    /**
     * 罚款费用剩余可退
     */
    private Double returnableFineMoney;
    /**
     * 礼品卡已退款金额
     */
    private Double refundGiftCardMoney;

    /**
     * 礼品卡剩余可退
     */
    private Double returnableGiftCardMoney;

    /**
     * 最近一笔退款记录备注
     */
    private String refundRemark;
    /**
     * 订单费用申诉统计相关信息
     */
    private FeeAppealInfoVO feeAppealInfoVO;

    /**
     * 计算剩余可退
     */
    public void computeReturnable() {
        returnableRideMoney = new BigDecimal(Double.valueOf(getDeductionCyclingMoney()).toString()).subtract(new BigDecimal(refundRideMoney.toString())).doubleValue();
        returnableFineMoney = new BigDecimal(Double.valueOf(getDeductionFineMoney()).toString()).subtract(new BigDecimal(refundFineMoney.toString())).doubleValue();
    }

}
